<template>
  <div class="search">
    <f-form ref="form" :action="api.bbr" :form-key="this.formItem.backcardRecordId" >
      <f-form-item label="用户id"  name="userId" dataType="${formField.dataType}"   :value="formItem.userId" />
      <f-form-item label="1已提交,2取消提交,3退卡专员审核中,4退卡专员审核拒绝,5退卡专员审核通过,6退款专员专员审核中,7退款专员审核拒绝,8退款专员审核通过,9财务经理审核中,10财务经理审核拒绝,11财务经理审核通过"  name="isCheck" dataType="number"   :value="formItem.isCheck" />
      <f-form-item label="提交者"  name="submitUserId" dataType="${formField.dataType}"   :value="formItem.submitUserId" />
      <f-form-item label="退卡卡号"  name="vipCardNo" dataType="${formField.dataType}"   :value="formItem.vipCardNo" />
      <f-form-item label="开户行"  name="bank" dataType="${formField.dataType}"   :value="formItem.bank" />
      <f-form-item label="银行卡号"  name="bankNo" dataType="${formField.dataType}"   :value="formItem.bankNo" />
      <f-form-item label="refund_ali,refund_wx,refund_bank"  name="refundWay" dataType="${formField.dataType}"   :value="formItem.refundWay" />
      <f-form-item label="承担（1会员全部承担，会员部分承担）"  name="bearWay" dataType="number"   :value="formItem.bearWay" />
      <f-form-item label="会员承担金额"  name="vipBearAmount" dataType="${formField.dataType}"   :value="formItem.vipBearAmount" />
      <f-form-item label="销售承担金额"  name="saleBearAmount" dataType="${formField.dataType}"   :value="formItem.saleBearAmount" />
      <f-form-item label="退卡金额"  name="refundAmount" dataType="${formField.dataType}"   :value="formItem.refundAmount" />
      <f-form-item label="退卡备注说明"  name="remark" dataType="${formField.dataType}"   :value="formItem.remark" />
      <f-form-item label=""  name="accountGoodsId" dataType="${formField.dataType}"   :value="formItem.accountGoodsId" />
      <f-form-item label="地区"  name="airportId" dataType="${formField.dataType}"   :value="formItem.airportId" />
      <f-form-item label="退卡专员备注"  name="remarka" dataType="${formField.dataType}"   :value="formItem.remarka" />
      <f-form-item label="退款专员备注"  name="remarkb" dataType="${formField.dataType}"   :value="formItem.remarkb" />
      <f-form-item label=""  name="refundDate" dataType="${formField.dataType}"   :value="formItem.refundDate" />
      <f-form-item label="退款凭证"  name="refundImg" dataType="${formField.dataType}"   :value="formItem.refundImg" />
      <f-form-item label="退卡原因"  name="refundReason" dataType="${formField.dataType}"   :value="formItem.refundReason" />
      <f-form-item label="补退方式"  name="addRefundWay" dataType="${formField.dataType}"   :value="formItem.addRefundWay" />
      <f-form-item label="补退备注"  name="addRefundRemark" dataType="${formField.dataType}"   :value="formItem.addRefundRemark" />
      <f-form-item label="补退金额"  name="addRefundAmount" dataType="${formField.dataType}"   :value="formItem.addRefundAmount" />
      <f-form-item label="标记备注"  name="tagRemark" dataType="${formField.dataType}"   :value="formItem.tagRemark" />
      <f-form-item label="退卡退款状态"  name="returnState" dataType="number"   :value="formItem.returnState" />
      <f-form-item label="是否删除"  name="deleted" dataType="number"   :value="formItem.deleted" />
      <f-form-item label="更新人"  name="updateUser" dataType="${formField.dataType}"   :value="formItem.updateUser" />
      <f-form-item label="更新时间"  name="updateTime" dataType="${formField.dataType}"   :value="formItem.updateTime" />
      <f-form-item label="创建人"  name="createUser" dataType="${formField.dataType}"   :value="formItem.createUser" />
      <f-form-item label="创建时间"  name="createTime" dataType="${formField.dataType}"   :value="formItem.createTime" />
    </f-form>
  </div>
</template>
<script>
  import api from './js/api'
  export default {
    name: 'bbrForm',
    props: {},
    data() {
      return {
        refs:this.$refs,
        api:  Object.assign(api, this.api),
        isAdd: true,//是否是添加模式
        loaded: false,//是否加载完成
        formItem: this.getFormItem()
      }
    },
    methods: {
      getFormItem() {
        return {
          backcardRecordId: '',
          userId: '',
          isCheck: '',
          submitUserId: '',
          vipCardNo: '',
          bank: '',
          bankNo: '',
          refundWay: '',
          bearWay: '',
          vipBearAmount: '',
          saleBearAmount: '',
          refundAmount: '',
          remark: '',
          accountGoodsId: '',
          airportId: '',
          remarka: '',
          remarkb: '',
          refundDate: '',
          refundImg: '',
          refundReason: '',
          addRefundWay: '',
          addRefundRemark: '',
          addRefundAmount: '',
          tagRemark: '',
          returnState: '',
          deleted: '',
          updateUser: '',
          updateTime: '',
          createUser: '',
          createTime: ''
        }
      },
      //表单赋值
      setData(data) {
        this.$refs.form.resetFields()
        this.formItem = this.getFormItem()
        if (data && data.backcardRecordId) {
          let params={
              backcardRecordId:data.backcardRecordId
          }
          this.refs['form'].getDetails(params,(data)=>{
             this.formItem=data
             this.loaded = true
          })
          this.isAdd = false
        } else {
          this.loaded = true
        }
      },
      //提交表单
      handleSubmit(callback) {
        this.$refs.form.submit({  }, callback)
      }
    },
    created() {
    },
    components: {}
  }
</script>

<style scoped lang="less" rel="stylesheet/less">

</style>
